<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
	<h4>Danh sách đơn hàng</h4>
	
	<table border="1" width="100%">
		<tr bgcolor="lightgray">
			<td>Id</td>
			<td>Order Date</td>
			<td>Address</td>
			<td>Note</td>
			<td>Total</td>
			<td>State</td>
			<td>User</td>
			<td>&nbsp;</td>
		</tr>


		<c:forEach var="c" items="${showOrders}">
			<tr>
				<td>${c.id}</td>
				<td>${c.orderDate}</td>
				<td>${c.address}</td>
				<td>${c.note}</td>
				<td>${c.total}</td>
				<td>${c.state}</td>
				<td>${c.customer.name}</td>

				<td><a href="crudOrderDetails.do?orderId=${c.id}">Chi tiết</a></td>
			</tr>
		</c:forEach>
	</table>
</body>
</html>